package com.lzh.vodtest;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.vod.model.v20170321.DeleteVideoRequest;
import com.aliyuncs.vod.model.v20170321.DeleteVideoResponse;

/**
 * @author lzhstart
 * @create 2021/5/11 10:08
 */
public class DeleteVideo {
    public static DeleteVideoResponse deleteVideo(DefaultAcsClient client) throws Exception {
        DeleteVideoRequest request = new DeleteVideoRequest();
        //支持传入多个视频ID，多个用逗号分隔
        // request.setVideoIds("VideoId1,VideoId2");
        request.setVideoIds("27707dbf69b8417e931ed8c30e115aeb");
        return client.getAcsResponse(request);
    }
    /*请求示例*/
    public static void main(String[] argv) {
        DefaultAcsClient client = InitObject.initVodClient("LTAI5tBBeCmiZBVhg7uuct1M", "LgzxNPlqnxPqHVyHSe9NqSO6WSD4IT");
        DeleteVideoResponse response = new DeleteVideoResponse();
        try {
            response = deleteVideo(client);
        } catch (Exception e) {
            System.out.print("ErrorMessage = " + e.getLocalizedMessage());
        }
        System.out.print("RequestId = " + response.getRequestId() + "\n");
    }
}
